#ifndef HISTORY_TRACK_PRIVATE_H
#define HISTORY_TRACK_PRIVATE_H
#include "DynamicEntity.h"
#include "PropertySetPrivate.h"

class HistoryTrackPointPrivate : public HistoryTrackPoint
{
public:
	HistoryTrackPointPrivate(HistoryTrackLine* parent = nullptr);
	~HistoryTrackPointPrivate();
public:
	SET_PROPERTY_BLOCK
public:
	void setColor(const QString& color);
	QString getColor()const { return trackPointColor; }

	HistoryTrackLine* getTrackLine()const { return trackLine; }
public:
	void setGeoPoint(const QVector3D& point) { geoPoint = point; }
	QVector3D getGeoPoint()const { return geoPoint; }

	void setLon(double lon) { geoPoint.setX(lon); }
	double getLon()const { return geoPoint.x(); }

	void setLat(double lat) { geoPoint.setY(lat); }
	double getLat()const { return geoPoint.y(); }

	void setAlt(double alt) { geoPoint.setZ(alt); }
	double getAlt()const { return geoPoint.z(); };
public:
	void setHeading(double newHeading) 
	{
		heading = newHeading;
	}
	double getHeading()const { return heading; }
public:
	void setScale(double newScale) 
	{
		if(newScale > 0.0 && scale != newScale)
			scale = newScale;
	}
	double getScale()const { return scale; }

	double getDefaultScale()const { return defaultScale; }
private:
	void dirty();
private:
	QVector3D geoPoint;
	double heading = 0.0;
	double scale = 1.0;
	double defaultScale = 1.0;
	QString trackPointColor;

	HistoryTrackLine* trackLine = nullptr;
};

#endif
